//
//
#ifndef NDimVec_h__
#define NDimVec_h__

#include "Stdafx.h"

namespace Geometric
{
#if 0
	template<class Value, int Dimension>
	class NVector
	{
	public:
		typedef typename NVector<Value, Dimension-1> _NVector;

	public:
		NVector()
		{

		}

		~NVector()
		{

		}

	public:
		inline void alloc(unsigned int _dim)
		{
			free();
			data = new _NVector[_dim];
		}

		inline void free()
		{
			delete[] data;
			data = NULL;
		}

	public:
		inline const _NVector& operator [] (unsigned int _index)
		{
			return data[_index];
		}

	public:
		NVector<Value, Dimension-1>* data;
	};


	template<>
	class NVector<Value, 1>
	{
	public:
		NVector(unsigned int _dim) :data(NULL)
		{
			alloc(_dim);
		}

		~NVector()
		{
			free();
		}

	public:
		inline void alloc(unsigned int _dim)
		{
			free();
			data = new Value[_dim];
		}

		inline void free()
		{
			delete[] data;
			data = NULL;
		}

	public:
		inline const Value& operator [] (unsigned int _index)
		{
			return data[_index];
		}

	public:
		Value* data;
	};
#endif
}

#endif